package com.boronstream.istar.http;

import java.util.Map;

public interface PlayRequest<T extends PlayResponse> {

	/**
	 * Get the Api Method Name
	 * 
	 * @return
	 * */
	public abstract String getApiMethodName();

	/**
	 * 
	 * @return The params for the request like:page,per,tag,etc.
	 */
	public abstract Map<String, Object> getRequestParams();

	/**
	 * 
	 * @return The params for the request like:page,per,tag,etc.
	 */
	public abstract Map<String, String> getRequestHeaders();
	
	/**
	 * 
	 * @param parmas
	 */
	public abstract void setRequestParams(Map<String, Object> parmas);

	/**
	 * 
	 * @return post json
	 */
	public abstract String getJsonParams();
	/**
	 * 
	 * @return
	 */

	public abstract HttpMethodType getHttpMethodType();

	/**
	 * 
	 * @return the response class
	 */
	public abstract Class<T> getResponseClass();

	public enum HttpMethodType {
		/**
		 * HttpMethod Post
		 */
		POST("POST"),

		/**
		 * HttpMethod Post content is json
		 */
		POST_JSON("POST_JSON"),

		/**
		 * HttpMethod Get
		 */
		GET("GET"),
		/**
		 * HttpMethod Delete
		 */
		DELETE("DELETE");

		public final String nativeString;

		HttpMethodType(String nativeString) {
			this.nativeString = nativeString;
		}
	}
}
